﻿using System;
using System.Collections.Generic;
using System.Text;
using Discuz.Toolkit;
using System.Web;

namespace Longtop.Web.SaleWeb.Admin.Helper {
    public static class ConformityHandler {
        public static string apikey, secret, webserver;
        private static bool IsInitObject = false;
        public static DiscuzSession ds;
        static ConformityHandler() {
            if (!IsInitObject) {
                apikey = System.Configuration.ConfigurationManager.AppSettings["DNTAPIKey"].ToString();
                secret = System.Configuration.ConfigurationManager.AppSettings["DNTSecert"].ToString();
                webserver = "http://" + HttpContext.Current.Request.Url.Authority + System.Configuration.ConfigurationManager.AppSettings["DNTWebServer"].ToString();
                ds = new DiscuzSession(apikey, secret, webserver);
                IsInitObject = true;
            }
        }
        public static DiscuzSession InitDiscuzSession() {
            return ds;
        }
    }
}
